From: Jonas Dreßler Date: Tue, 12 Feb 2019 12:04:55 +0000 (+0100) Subject: workspace: Reset idle hide timeout for overlays on reentry X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~811^2^2~53 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3094f8633466c8b1cf7646b832c5cd497fc71afa;p=gnome-shell.git workspace: Reset idle hide timeout for overlays on reentry Instead of returning and waiting until the old timeout is finished, start a new idle hide timeout for the overlay when the pointer enters a window clone. This makes sure the timeout for hiding the overlay after the pointer left the clone mostly stays the same (except when leaving the clone via the title or the close button). https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683 --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 4d1f65115..b80aa6c9e 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -686,10 +686,11 @@ var WindowOverlay = class { } _onHideChrome() { - if (this._idleHideOverlayId == 0) { - this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this)); - GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay'); - } + if (this._idleHideOverlayId == 0) + GLib.source_remove(this._idleHideOverlayId); + + this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this)); + GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay'); } _idleHideOverlay() {